package com.voe.common;

/** type of Automatic Gain Control
 */
public enum AgcModes {

	/** previously set mode
	 */
	kAgcUnchanged(0), 
	/** platform default
	 */
	kAgcDefault(1),
	/** adaptive mode for use when analog volume control exists (e.g. for PC softphone)
	 */
	kAgcAdaptiveAnalog(2),
	/** scaling takes place in the digital domain (e.g. for conference servers
	 *  and embedded devices)
	 */
    kAgcAdaptiveDigital(3),
    /** can be used on embedded devices where the capture signal level
     *  is predictable
	 */
    kAgcFixedDigital(4);

	public static AgcModes fromValue(int value) {
		for (int i=0;i<AgcModes.values().length;i++) {
			if(AgcModes.values()[i].getValue() == value)
				return AgcModes.values()[i];
		}
		return null;
	}

	/**
	 * Constructor.
	 */
	private AgcModes(int value) {
		this.value = value;
	}

	/**
	 * Get the value.
	 * 
	 * @return the value
	 */
	public int getValue() {
		return value;
	}

	private final int value;
}
